<template>
	<!--签收信息-->
	<div>
		<view style="position: relative;display: flex;flex-direction: row;align-items: center;padding: 12px 10px;font-weight: 400;">
			<view style="width: 4px;height: 12px;border-radius: 10px;background-color: #2979ff;margin-right: 6px"></view>
			<view style="display: flex;flex-direction: column;flex: 1;color: #333;">签收信息</view>
		</view>
		<!--200已签收 230已完成-->
		<view v-if="formData.signVo&&(formData.status=='200'||formData.status=='230')">
			<view style="background-color: #ffffff;margin: 10px;border-radius: 12px;padding: 15px;">
				<view style="display: flex;justify-content: space-between;">
					<view>签收人：{{formData.signVo.signer}}</view>
					<text style="color: #eb884c;margin-right: 5px;">{{formData.signVo.signedStatus=='0'?'待签收':'已签收'}}</text>
				</view>
				<view>联系电话：{{formData.signVo.signedPhone}}</view>
				<view>身份证号：{{formData.signVo.signedIdcard}}</view>
				<view>代理签收：{{formData.signVo.signedAgentFlag=='1'?'是':'否'}}</view>
				<view>签收类型：{{signedType_[formData.signVo.signedType]}}</view>
				<view>签收时间：{{formData.signVo.updateTime||''}}</view>
				<view>回单附件：<myfilepicker readonly :fileIdString="formData.signVo.signedAttach" :fileMediatype="'image'"></myfilepicker></view>
				<view>备注：{{formData.signVo.signedRemark||''}}</view>
			</view>
		</view>
		<view v-else>
			<image src="../../../static/none.png" style="height: 260px;width: 260px;display: block;margin: 0 auto;padding-top: 50px;"></image>
			<view style="display: flex;justify-content: center;align-items: center;">
				暂无签收信息
			</view>
		</view>
	</div>
</template>

<script>
	import {getDicts} from '@/api/system/dict.js'
	import myfilepicker from '@/components/uploadFile/uploadFile.vue'
	export default {
		components: {
			myfilepicker
		},
		props: {
			data:{
				type: Object,
				default:{}
			}
		},
		data() {
			return {
				formData:{},
				//下拉框 ->签收类型
				signedType_:[],
			}
		},
		watch: {
			data:{
			    handler(newVal,oldVal){
					this.formData=newVal
			    },
				deep:true,
				immediate:true
			}
		},
		created() {
			//下拉框->签收类型
			getDicts('signed_type').then(res=>{
				res.data.forEach(item=>{
					this.signedType_[item.dictValue]=item.dictLabel
				})
			})
		},
		methods: {
		},
	}
</script>

<style scoped>

</style>